package com.example.hotelsystem.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
 * <p>
 * 
 * </p>
 *
 * @author Lee
 * @since 2020-10-14
 */
@Data
@ApiModel(value="Room对象", description="")
public class Room implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "房间id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotNull(message = "请填写房间号码")
    @ApiModelProperty(value = "房间号")
    @Excel(name = "房间号码", orderNum = "0")
    private Long number;

    @NotNull(message = "请选择所属楼层")
    @ApiModelProperty(value = "所属楼层")
    private Long floorId;

    @NotNull(message = "请选择房间类型")
    @ApiModelProperty(value = "房间类型")
    private Long roomtypeId;

    @ApiModelProperty(value = "房间电话")
    private String roomTel;

    @NotNull(message = "请选择所属城市")
    @ApiModelProperty(value = "所属城市id")
    private Long cityId;

    @NotNull(message = "请选择所属酒店")
    @ApiModelProperty(value = "所属酒店id")
    private Long hotelId;


    @ApiModelProperty(value = "状态(0:空房,1:已入住,2:待退房,3:待打扫)")
    private Integer status;

    @ApiModelProperty(value = "逻辑删除")
    private Integer deleted;

    @ApiModelProperty(value = "密码锁")
    private String lockPassword;

    @Version
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    private Integer isDelete;

    @TableField(exist = false)
    private Object roomType;

    @TableField(exist = false)
    @Excel(name = "房间类型", orderNum = "1")
    private String roomTypeName;

    @TableField(exist = false)
    private String cityName;

    @TableField(exist = false)
    @Excel(name = "所在楼层", orderNum = "2")
    private String floorName;

    @TableField(exist = false)
    @Excel(name = "所在酒店", orderNum = "3")
    private String hotelName;

    @TableField(exist = false)
    @Excel(name = "目前状态", orderNum = "4")
    private String statusText;
}
